package com.ynwt.repository;

import com.ynwt.domain.ReplyMsg;
import com.ynwt.constant.CacheConst;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Created by huangying on 2017/4/27.
 */
@Repository
public interface ReplyMsgDao extends PagingAndSortingRepository<ReplyMsg, Integer> {

    int countByKeyWord(String keyWord);

//    @Cacheable(value = "findByKeyWordOrderByPriority", keyGenerator = CacheConst.KEY_GENERATOR)
    List<ReplyMsg> findByKeyWordOrderByPriority(String key);
}
